#ifndef __BSP_UART_CORE__
#define __BSP_UART_CORE__

#include "stdint.h"
#include "ring_buff.h"


typedef struct _msg_port_t
{
	uint8_t 				State;
	ringBuffPort_t	MsgTX_RingBuff;
	ringBuffPort_t	MsgRX_RingBuff;
	uint8_t 				(*check_send_state)(void);
	void 						(*uart_write)(uint8_t *str,uint8_t size);

}msg_port_t;


typedef enum
{
	UART_PORT_ERR = 0,
	UART_PORT_OK,
}UART_PORT_TYPE;

typedef enum
{
	UART_PORT_READY = 0,
	UART_PORT_BUSY ,	
}UART_PORT_STATE;

typedef enum
{
	LOG_COMMON = 0,
	LOG_WARNING,
	LOG_ERR,
	LOG_IMPORTANT,
}LOG_LEVEL;

extern char *ascii_control[];

__weak uint8_t check_send_state(void);
__weak void uart_write(uint8_t *str,uint8_t size);

#endif
